import VueRouter from 'vue-router';

//导入对应的路由模块
import HomeContainer from './components/tabbar/HomeContainer.vue';
import MemberContainer from './components/tabbar/MemberContainer.vue';
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue';
import SearchContainer from './components/tabbar/SearchContainer.vue';
import newsList from './components/news/newsList.vue';
import newsInfo from './components/news/newsInfo1.vue';
import photoList from './components/photos/photoList';
import photoInfo from './components/photos/photoInfo';
import goodsList from './components/goods/GoodsList';
import goodsInfo from './components/goods/GoodInfo'

//创建路由对象
var router =new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:newsList},
        {path:'/home/newsInfo/:id',component:newsInfo},
        {path:'/photo/photoList',component:photoList},
        {path:'/photo/photoInfo/:id',component:photoInfo},
        {path:'/goods/goodList',component:goodsList},
        {path:'/goods/goodsInfo/:id',component:goodsInfo}
    ]
})

//暴露路由对象
export default router;